From 8d5fbd1720b110171a831aca07dc5c825522328e Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Mon, 1 Feb 2016 17:02:23 -0500 Subject: [PATCH] Add a test for this too --- tests/test_cargo_registry.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tests/test_cargo_registry.rs b/tests/test_cargo_registry.rs index b9c986519..793235ede 100644 --- a/tests/test_cargo_registry.rs +++ b/tests/test_cargo_registry.rs @@ -956,3 +956,22 @@ test!(update_same_prefix_oh_my_how_was_this_a_bug { assert_that(p.cargo("update").arg("-pfoobar").arg("--precise=0.2.0"), execs().with_status(0)); }); + +test!(use_semver { + let p = project("foo") + .file("Cargo.toml", r#" + [project] + name = "bar" + version = "0.5.0" + authors = [] + + [dependencies] + foo = "1.2.3-alpha.0" + "#) + .file("src/main.rs", "fn main() {}"); + p.build(); + + Package::new("foo", "1.2.3-alpha.0").publish(); + + assert_that(p.cargo("build"), execs().with_status(0)); +}); -- 2.30.2